<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
	<div class="header">    	
        <div class="hd">
            <div class="upanh">
                <h1><a title="Welcome to Upanh.com" class="logo" href="#"><img original="/templates/default/img/upanh.png" alt="chỗ này là slide" src="/templates/default/img/upanh.png"></a></h1>
                <div class="search">
                	<input value="" name="search" id="search" type="text">
                    <input id="bt_search" value="tìm kiếm" name="bt_search" type="submit">
                </div>	
            </div>
            
            <div class="menutop">
            	<ul>
                	<li><a title="English" href="#">English</a> | </li>
                    <li><a title="Giới thiệu" href="#">Giới thiệu</a> | </li>
                    <li><a title="Quảng cáo" href="#">Quảng cáo</a> | </li>
                    <li><a title="Góp ý" href="#">Góp ý</a> | </li>
                    <li><a title="Cho Webmaster" href="#">Cho Webmaster</a></li>
                </ul>                
                <div class="clear"></div>
                
                <div class="top-box">
                	<a title="Đăng ký" class="current reg" href="#">Đăng ký</a>
                </div>                 
                <div class="top-box" id="login">
                	<a title="Đăng nhập hệ thống" class="login pop" rel="0" alt="#login" href="#" id="loginLink" style="outline:none">Đăng nhập</a>
                	
				</div>
                
                
            </div>
            <div class="clear"></div>
        </div>        
    </div>
    
        <script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
		<script type="text/javascript">
		$(document).ready(function(e) {
			$(".main_menu ul li").hover(function(e) {
				$(this).find("ul").show("fast");
			},function(e) {
				$(this).find("ul").hide("fast");
			});
		});
		</script>
<div class="om">
    <div class="main_menu">
    	<!-- MENU-->
        <p class="left"></p>
        <ul>
            <li><a href="#">Trang chủ</a></li>
            <li><a href="#">Giới Thiệu</a>
                <ul>
                    <li><a href="#">các lĩnh vực</a></li>
                    <li><a href="#">abc kinh doanh</a></li>
                    <li><a href="#">Danh sách</a></li>
                </ul>        	
            </li>
            <li><a href="#">Tin tức</a>
            	<ul>
                    <li><a href="#">các lĩnh vực</a></li>
                    <li><a href="#">abc kinh doanh</a></li>
                    <li><a href="#">Danh sách</a></li>
                </ul>
            </li>
            <li><a href="#">Tuyển Dụng</a>
            	<ul>
                    <li><a href="#">các lĩnh vực</a></li>
                    <li><a href="#">abc kinh doanh</a></li>
                    <li><a href="#">Danh sách</a></li>
                </ul>
            </li>
            <li><a href="#">Liên Hệ</a></li>
            <li><a href="#">Site map</a></li>
        </ul>
        <p class="right"></p>
</div>
        <!-- END MENU-->
        <div class="clear"></div>
    </div>
<script language="JavaScript">
	$(document).ready(function() {
		$("img").lazyload();
		$("#loginLink").click(function(){
			s = $(this).attr('rel');
			if ( $(this).attr('rel')==0 ) {
				$("#loginBox").slideDown("fast");
				$(this).removeClass("login").addClass("current-login");
				$(this).attr('rel', 1);
			} else {
				var _this = $(this);
				$("#loginBox").slideUp("fast", function() {
					_this.removeClass("current-login").addClass("login");
				});
				$(this).attr('rel', 0);
			}
			return false;
		});
	
		$(".imgTitle").each(function() {
			$(this).html( $(this).html().substring(0, 20) );
		});
		
		$("#profileLink").click(function(){
			s = $(this).attr('rel');
			if ( $(this).attr('rel')==0 ) {
				$("#profileBox").slideDown("fast");
				$(this).removeClass("login").addClass("current");
				$(this).attr('rel', 1);
			} else {
				var _this = $(this);
				$("#profileBox").slideUp("fast", function() {
					_this.removeClass("current");
				});
				$(this).attr('rel', 0);
			}
			return false;
		});
			
		$("#loginForm").submit(function() {
			$.post("/post/login/", $(this).serialize(), function(data) {
				if ( data.err>0 )
					alert(data.content);
				else location.href = location.href;
			}, 'json');
			return false;
		});
		
		$(".main_menu ul li").hover(function() {
			$(this).addClass("selected");
			$(this).children("ul").slideDown("fast");
		}, function() {
			var _this = $(this);
			if ( $(this).children("ul").length>0 )
				$(this).children("ul").slideUp("fast", function(){
					_this.removeClass("selected");
				});
			else _this.removeClass("selected");
		});
		
		$(document).click(function(e) {
			$(".pop[rel=1]").each(function() {
				if ( $(e.target).hasParent($(this).attr("alt"))==false ) {
					$(this).click();
				}
			});
		});
	});
</script>   
<div class="content">
		
   <div id="log"></div>
   <div class="upload uploadBox" style="min-height: 197px">  			
            </div>
            
            
	          
       
        
        <div class="clear"></div>
        
    </div>
    <div class="info">
    	<div class="bor">
            <div class="inf">
                <div class="box_info">
                    <div><img original="/templates/default/img/money.gif" src="/templates/default/img/money.gif" alt="anh1"></div>
                    <h4>Kiếm tiền dễ dàng</h4>
                    <p>Bạn đã bao giờ thử cảm giác kiếm tiền thật dễ dàng từ chính những bức ảnh bạn upload và chia sẻ với bạn bè?</p>
                    <a title="Tìm hiểu thêm" href="#">Tìm hiểu thêm »</a>
                </div>
                <div class="box_info">
                    <div><img original="/templates/default/img/save.gif" src="/templates/default/img/save.gif" alt="anh2"></div>
                    <h4>Lưu trữ không giới hạn </h4>
                    <p>Kho lưu trữ ảnh trực tuyến vô giới hạn dành riêng cho bạn. Thoải mái upload và chia sẻ!</p>
                    <a title="Tìm hiểu thêm" href="#">Tìm hiểu thêm »</a>
                </div>
                <div style="border: medium none;" class="box_info">
                    <div><img original="/templates/default/img/vip.gif" src="/templates/default/img/vip.gif" alt="anh3"></div>
                    <h4>Bạn là VIP?</h4>
                    <p>Đăng kí ngay cho mình 1 tài khoản VIP với các chế độ ưu đãi đến bất ngờ và chỉ dành riêng cho VIP!</p>
                    <a title="Tìm hiểu thêm" href="#">Tìm hiểu thêm »</a>
                    <a title="Đăng ký" style="margin-right: 0pt;" href="#">Đăng ký »</a>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    
<script language="JavaScript">

var objupload;
var maxSize = new Array();
	maxSize['jpg'] = 10*1024*1024;
	maxSize['gif'] = 2*1024*1024;
	maxSize['png'] = 10*1024*1024;
	maxSize['bmp'] = 10*1024*1024;
	maxSize['jpeg'] = 10*1024*1024;

var uploaded = new Object();
	uploaded.totalFile = 0;
	uploaded.listId = new Array();
	
var fileins_tpl = '<tr style="background-position: -700px 0pt;" class="progressbar" id="file_%id">\
		                    	<td class="title">%name</td><td class="size">%size</td>\
		                        <td class="su" alt="%msg"><a class="close fr delFile" rel="%id" href="#">[x]</a></td>\
		                    </tr>';

var box_uploaded = '<li id="box_file_%id" class="uploadedfile">\
                    	<a title="%title" href="/%title/v/%id.htm" target="_blank"><img alt="%title" src="%link"></a>\
                        <p><input type="text" class="text-120 edittitle" value="%title" alt="%title" name="text " onclick="this.select();"></p>\
                        <input type="button" class="button-orange-55 saveButton" rel="%id" style="visibility: hidden" value="Lưu" name="submit" id="submit">\
                        <input type="button" class="button-black-55 resetButton" style="visibility: hidden" value="Bỏ qua" name="reset" id="reset">\
                    </li>';
	
function byte_convert(bytes)
{
	var symbol = new Array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
	exp = 0;
	converted_value = 0;
	if( bytes > 0 )
	{
		exp = Math.floor( Math.log(bytes)/Math.log(1024) );
		converted_value = ( bytes/Math.pow(1024,Math.floor(exp)) );
	}
	return (Math.floor( converted_value*100 )/100)+' '+symbol[exp];
}
	
function error(type) {
	switch(type) {
		case 'MANY_FILES':
			$(".alert").html("Bạn chỉ được chọn 4 file cho mỗi lượt Upload.");
			break;
		case 'TOO_BIG':
			$(".alert").html("Bạn có "+arguments[1]+" file vượt quá dung lượng cho phép ( 10Mb )");
			break;
	}
}

function checkNewAlbum($obj) {
	if ( $obj.get(0).checked )	{
		$obj.parent().children("select").addClass("hide");
		$obj.parent().children("input[type=text]").removeClass("hide");
	} else {
		$obj.parent().children("select").removeClass("hide");
		$obj.parent().children("input[type=text]").addClass("hide");
	}
}

function check_captcha() {
	// Don't Check
	return true;
	
	var check=false;
	$("#loading").html("<img src='/images/ajax-loader.gif'>");
	$.ajax({
	   type: "POST",
	   url: "/post/checkcaptcha/id=upload",
	   data: "code="+$("#captcha_code").val()+"&ss="+$("#regss").val(),
	   async: false,
	   dataType: "json",
	   success: function(data){
			if ( data.err==0 ) {
				check = true;
	 			$("#loading").html("<img src='/images/tickok.png'>");
			} else {
	 			$("#loading").html("");
			}
	   }
	 });
	 return check;
}

var toAlbum = 0;

function create_album(name) {
	$("#loading2").html("<img src='/images/ajax-loader.gif'>");
	var check = false;
	$.ajax({
	   type: "POST",
	   url: "/post/createalbum/id=",
	   data: "name="+$("#newAlbumName").val(),
	   dataType: "json",
	   async: false,
	   success: function(data){
			if ( data.err==0 ) {
				check = true;
				toAlbum = data.content;
	 			$("#loading2").html("<img src='/images/tickok.png'>");
			} else {
	 			$("#loading2").html("");
			}
		}
	});
	return check;
}

function insertFile(id, file) {
	var tpl = fileins_tpl;
	tpl = tpl.replace("%size", byte_convert(file['size']));
	tpl = tpl.replace("%name", file['name']);
	tpl = tpl.replace(/%id/g, id);
	if ( file['status']==2 )
		tpl = tpl.replace(/%msg/g, "( File quá lớn )");
	else tpl = tpl.replace(/%msg/g, "");
	
	$(".boxListFile").append(tpl);
	$("#uploadButton").removeClass("hide");
}

function insertFileComplete(inf) {
	uploaded.totalFile = inf.totalFile;
	$(".step1").css("display", "none");
	$(".step2").css("display", "");
	$("#totalSize").html( byte_convert(inf.totalSize) );
	$("#totalFile").html(inf.totalFile);
	$("#browseBox").width(140);
	objupload.changetext("Thêm file");
	//objupload.hideupbutton(1);
}

function delFile(i) {
	$("#file_"+i).fadeOut("fast", function() {
		$(this).remove();
	});
	return false;
}

function preUpload($obj) { 
	if ( !$("#allow").attr("checked") ) {
		alert("Hãy chọn nút đồng ý với điều khoản sử dụng.");
		return false;
	} else
		if ( !check_captcha() ) {
			alert("Captchar chưa đúng, hãy nhập lại.");
			$("#captcha_code").val("").focus();
			return false;
		}
	
	$("#upload-info").css("display", "none");
	$("#browseBox").html("Đang Upload ... <span id='totalPercent'>");
	$("#browseBox").parent().children(":last").empty();
		
	var att = new Array();
	att['extra'] = '';
	att['title'] = '';
	att['tags'] = $('#tags').val();
	att['sessions'] = 'aeb176c86795b2cd0cbaed5166dce334';
	att['albumid'] = ($('#album').length==1)?$('#album').val():0;
	att['size'] = $('#size').val();
	att['share'] = ($("#public").attr("checked") == true)?0:1;
	att['sid'] = '';
	objupload.attach(att);
	
	return true;
}

function updateProgress(id, filepercent, ttpercent) {
	offset = (1-filepercent/100)*-700;
	//$("#totalPercent").html(ttpercent+'%');
	$("#file_"+id).css("background-position", offset+"px 0px");
	//$("#file_"+id).animate({backgroundPosition: offset+"px 0px"}, 1000);
}

function uploadComplete(id) {
	//console.log(id);
	if ( id>=0 ) {
		$("#file_"+id).css("background-position", "");
		$("#file_"+id).children("td.su").empty();
		$("#file_"+id).removeClass("progressbar");
		$("#file_"+id).addClass("finish");
	} else {
		//$("#browseBox").html("Xin chờ trong giây lát ...");
	}
}

function addUploadedBox(data) {
	var tpl = box_uploaded;
	
	tpl = tpl.replace(/%title/g, data.title)
		.replace(/%id/g, data.id)
		.replace(/%link/g, data.thumblink);
	//console.log(tpl);
	if ( data.id != 'undefined' )
		$("#uploadedBox").append(tpl);
}
	
function RevResponse(dat) {
	var data = eval("(" + dat + ')');
	if ( data.err ) {
		alert(data.err);
	} else {
		//addUploadedBox(data);
		uploaded.listId.push(data.id);
		$("#uploaded_view_link").val("http://upanh.com/uploaded/s="+data.ss);
			$("#browseBox").html("Xin chờ trong giây lát ... hoặc click <a href='http://upanh.com/uploaded/s="+data.ss+"'>vào đây</a>");
		
		if ( uploaded.listId.length == uploaded.totalFile ) {
			$("#browseBox").html("Xin chờ trong giây lát ...");
			$(".uploadBox").css("display", "none");
			$(".uploadedBox").css("display", "");
			$(".uploadedBox").prependTo(".content");
			window.location.href = "http://upanh.com/uploaded/s="+data.ss;
		} /*else 
			$.get("/get/uploaded/ss=aeb176c86795b2cd0cbaed5166dce334", function(data) {
				$(".uploadBox").children().css("display", "none");
				$(".uploadedBox").css("display", "");
				$("#uploadedBox").html("");
				$.each(data, function(i, item) {
					addUploadedBox(item);
				});
			}, 'json');*/
	}
}

function check_field(id) {
	var $form = $("#boxUploaded_"+id);
	
	
}
var allsuccess=1;
$(document).ready(function() {
	objupload = $("#btBrowse").FUpload({
			maxFile:			200,
			fileType:			"*.jpg; *.png; *.bmp; *.jpeg; *.gif;",
			fileDesc:			"IMAGES ( JPG, PNG, BMP, GIF )",
			maxSize:			maxSize,
			flashName:			"FlashUpload",
			flashUrl:			"/flash/upanh.swf",
			Uploadto:			"/?mode=upload",
			//Uploadto:			"/test.php",
			width:				154,
			height:				30,
			debug : 			false,
			btUpload:			$("#uploadButton"),
			btDelFile:			$(".delFile"),
			delFile:			delFile,
			InsertFile:			insertFile,
			RevResponse:		RevResponse,
			updateProgress:		updateProgress,
			UploadComplete:		uploadComplete,
			preUpload:			preUpload,
			error:				error,
			InsertFileComplete :insertFileComplete,
	});
	
	$(".edittitle").livequery('keyup', function() {
		$(this).parent().parent().children("input[type=button]").css("visibility", "");
	});
	
	$(".resetButton").livequery('click', function() {
		var $t = $(this).parent().find(".edittitle");
		$t.val( $t.attr("alt") );
		$(this).parent().children("input[type=button]").css("visibility", "hidden");
	});
	
	$("#close").click(function() {
		$(this).parentsUntil(".adv").parent().slideUp();
		return false;
	});
	
	$(".saveButton").livequery('click', function() {
		id = $(this).attr("rel");
		var $t = $(this).parent().find(".edittitle");
		var content = $t.val();
		$.post("/post/setinfo/id="+id, { title: content, ssup: 'aeb176c86795b2cd0cbaed5166dce334' }, function (data) {
			$t.attr("alt", $t.val());
			$t.parent().parent().children("input[type=button]").css("visibility", "hidden");
		}, 'json');
	});
	
	$("input.copytext").click(function() {
		$(this).copy();
	});
	
	$("#create_album").click(function() {
		$.facebox({ ajax: '/get/createAlbum/' });
	});
});
</script>   <div class="bg_footer ">
        <div class="footer">
            <div class="copy">
                <p>2012 © vũ việt an 256 </p>
                <ul>
                    <li><a href="#" title="">thông tin trang web</a> | </li>
                    <li><a href="#" title="">bảo mật</a> | </li>
                    <li><a href="#" title="">đối tác</a></li>
                </ul>
            </div>
            <ul class="menu_bot">
                <li><a href="#/chinh_sach" title="Chính sách">Chính sách</a> | </li>
                <li><a href="#/dieu_khoan" title="Điều khoản">Điều khoản</a> | </li>
                <li><a href="#/huong_dan" title="Hướng dẫn">Hướng dẫn</a> | </li>
                <li><a href="#/blog" title="Blog">Blog</a> | </li>
                <li><a href="#/contact" title="Liên hệ">Liên hệ</a> </li>
            </ul>
            <div class="clear"></div>
            <div id="flashcopier"></div>
         </div>
   </div>

<script language="JavaScript">
function getCookie(c_name)
{
	var i,x,y,ARRcookies=document.cookie.split(";");
	for (i=0;i<ARRcookies.length;i++)
	{
		x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
		y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
		x=x.replace(/^\s+|\s+$/g,"");
		if (x==c_name)
		{
			return unescape(y);
		}
	}
}

function setCookie(c_name,value,exdays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate() + exdays);
	var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
	document.cookie=c_name + "=" + c_value;
}

$("body").click(function() {
	if ( getCookie("popup")==1 ) {
		
	} else {
		setCookie("popup", "1");
		var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
		if ( is_chrome ) {
			var popupWindow = window.open('http://www.tinmoitruong.vn/du-ngoan/kham-pha-thung-lung--xac-chet--o-luxor_27_14383_1.html');
			popupWindow.blur();
			window.focus();
		} else {
			var popupWindow = window.open('http://www.tinmoitruong.vn/du-ngoan/kham-pha-thung-lung--xac-chet--o-luxor_27_14383_1.html');
			setTimeout(function() {
				popupWindow.blur();
				window.focus();
			}, 1000);
		}
	}
});
</script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-12766532-1']);
  _gaq.push(['_setDomainName', 'upanh.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script language="JavaScript">
$(document).ready(function() {
	$(".tocopy").click(function() {
		$(this).copy();
	});
});
</script>





<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>


<!--- Ads by Ambient Digital --->
